package com.kgc.dao;

import com.kgc.entity.BuyCartProduct;
import com.kgc.entity.Category;
import com.kgc.entity.Product;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author :qinya
 * @PackageName:com.kgc.dao
 * @ClassName: ProductDao
 * @Description: TODO
 * @date : 2025/5/16,21:12
 */
@Mapper
public interface ProductMapper {
    List<Product> selectAllProduct();

    int updateProduct(@Param("product") Product product);

    int insertProduct(@Param("product") Product product);

    int deleteProduct(String id);

    int updateProductStock(@Param("product") Product product);

    Product selectProductById(String id);

    List<Category> selectCategoryByProduct(@Param("product") Product product);

    //购物车的商品信息
    BuyCartProduct selectBuyCartProductById(String id);


}
